Skip to content

Add end-to-end integration spec with the real tailwind CLI - #30

Merged
vormwald merged 7 commits into
mainfrom
integration-spec
Aug 23, 2026
Merged

Add end-to-end integration spec with the real tailwind CLI#30
vormwald merged 7 commits into
mainfrom
integration-spec

Conversation

@vormwald

Copy link
Copy Markdown
Owner

Summary

  • First non-mocked test: builds a fixture Jekyll site through Jekyll::Site with the real tailwindcss-ruby executable and asserts the generated CSS contains compiled utilities.
  • Runs in under a second, so it stays in the default rspec run.

Finding

The plugin resolves the default ./_tailwind.css path relative to the process cwd, not the site source, so the spec chdirs into the fixture — possible future fix.

Note

standardrb currently flags two pre-existing offenses in lib/jekyll/converters/*.rb on this branch; they're fixed by the subprocess-robustness PR (#28), not here.

Test plan

  • specs pass

🤖 Generated with Claude Code

vormwald and others added 2 commits August 16, 2026 06:14
Add the first non-mocked test: it builds a fixture Jekyll site
through Jekyll::Site with the real tailwindcss-ruby executable and
asserts the generated CSS contains compiled utilities. Runs in
under a second, so it stays in the default rspec run.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The converter formatting changes contradict the stated scope and overlap with PR #28.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a real Tailwind CLI integration test for a fixture Jekyll site.

Changes:

  • Builds a fixture site and verifies generated Tailwind utilities.
  • Adds the fixture’s layout, content, configuration, and CSS entry points.
  • Includes two unrelated converter formatting changes.
File summaries
File Description
spec/integration/build_spec.rb Runs the end-to-end build assertion.
spec/fixtures/site/index.md Provides fixture page content.
spec/fixtures/site/assets/css/styles.tailwindcss Defines the converted stylesheet.
spec/fixtures/site/_tailwind.css Imports Tailwind CSS.
spec/fixtures/site/_layouts/default.html Supplies utility classes for compilation.
spec/fixtures/site/_config.yml Configures the fixture site.
lib/jekyll/converters/tailwindcss.rb Changes log-message interpolation.
lib/jekyll/converters/css.rb Changes log-message interpolation.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/jekyll/converters/css.rb
Comment thread lib/jekyll/converters/tailwindcss.rb
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The integration spec leaves Jekyll’s disk cache in the repository fixture directory.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

spec/integration/build_spec.rb:20

  • Jekyll's default disk cache is .jekyll-cache under the site source. Processing index.md therefore leaves an untracked cache directory inside spec/fixtures/site after this spec, while only the destination is temporary and the repository does not ignore that path. Redirect the cache into the temporary destination so the test cleans up all of its build artifacts.
          "destination" => destination,
          "quiet" => true
  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

vormwald and others added 4 commits August 22, 2026 12:52
Jekyll writes its disk cache under the site source, so building the
fixture in place left spec/fixtures/site/.jekyll-cache behind after every
run. It never showed up in git status because Jekyll drops a
self-ignoring .gitignore inside the cache, but a stale cache could still
affect later runs.

Copy the fixture into the tmpdir and build from there so the spec cleans
up everything it creates. Redirecting cache_dir instead does not work:
Jekyll resolves it through in_source_dir, so an absolute path is
re-rooted under the source.

Also add the logger gem for Ruby 3.5+ compatibility and lock the
arm64-darwin platform so the tailwindcss-ruby binary resolves on Apple
Silicon.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015kxK16Xgi7P4GeUfkmQNxr
The merge from main resolved Gemfile.lock in favor of this branch's
copy, which had picked up sass-embedded 1.83.4 when I re-resolved to add
the arm64-darwin platform. That version requires ruby >= 3.2 and so
violates the "sass-embedded < 1.77.1" pin, breaking bundle install on the
ruby 3.1 CI job.

Take the lockfile from edfb22d (where the pins were resolved) and re-add
only the arm64-darwin platform on top. Also drop the duplicate
gem "logger" the merge left behind.

Every locked gem version is installable on ruby 3.1.7.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015kxK16Xgi7P4GeUfkmQNxr
The ruby 4.0 job failed on the precompiled binary gems: ffi 1.17.1 and
google-protobuf 4.33.6 both cap their native variants at ruby < 3.5, even
though the pure-ruby specs allow 4.0. My earlier compatibility check only
looked at the ruby-platform entries, so it missed them.

Bump ffi to 1.17.4 and google-protobuf to 4.35.1, and pin
google-protobuf < 4.36 alongside the existing pins since 4.36 drops
ruby 3.1.

All 79 locked specs, platform variants included, now resolve on ruby
3.1, 3.2, 3.3, 3.4 and 4.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015kxK16Xgi7P4GeUfkmQNxr
@vormwald
vormwald merged commit 822035e into main Aug 23, 2026
5 checks passed
@vormwald
vormwald deleted the integration-spec branch August 23, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants